<template>
    <div v-if="show" style="width: 100%;height: 100%;">
        main
    </div>
</template>

<script setup>
import { ref, reactive, defineProps, computed, watch, onMounted, onBeforeUnmount } from 'vue'
import tool from '../tool';

const show = ref(false)

const status = ref(0)
tool.store.onChangeAndNotify('windowStatus', (e) => {
    status.value = e
})

onMounted(async () => {
    if (tool.store.getItem('userData') === undefined) {
        tool.routerf().push('/login')
        tool.controls.toast.show({
            content: '未登录',
            icon: 'error'
        })
        return
    }

    show.value = true
})

</script>

<style scoped></style>